package com.example.demo.controller;
import org.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexController {
 @RequestMapping({"/", "/toIndex"})
 public String toIndex(Model model) {
  model.addAttribute("message", "Hello,how are you doing?");
  return "index";
 }
}